home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / lib / imake / Imake.tmpl < prev    next >
Encoding:
Text File  |  1992-08-20  |  21.2 KB  |  925 lines

  1. /*
  2.  * generic imake template
  3.  */
  4.  
  5. #ifndef XCOMM
  6. #define XCOMM #
  7. #endif
  8. XCOMM -------------------------------------------------------------------------
  9. XCOMM Makefile generated from IMAKE_TEMPLATE and INCLUDE_IMAKEFILE
  10. XCOMM $XConsortium: Imake.tmpl,v 1.139 91/09/16 08:52:48 rws Exp $
  11. XCOMM
  12. XCOMM Platform-specific parameters may be set in the appropriate <vendor>.cf
  13. XCOMM configuration files.  Site-specific parameters should be set in the file
  14. XCOMM site.def.  Full rebuilds are recommended if any parameters are changed.
  15. XCOMM
  16. XCOMM If your C preprocessor does not define any unique symbols, you will need
  17. XCOMM to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
  18. XCOMM "make World" the first time).
  19. XCOMM
  20.  
  21. #define    YES    1
  22. #define NO    0
  23.  
  24.  
  25. /*
  26.  * To add support for another platform:
  27.  * 
  28.  *     1.  Identify a machine-specific cpp symbol.  If your preprocessor 
  29.  *         does not have any built in, you will need to add the symbol to the
  30.  *         cpp_argv table in config/imakemdep.h and rebuild imake with the
  31.  *         BOOTSTRAPCFLAGS variable set (see the macII for an example).
  32.  *
  33.  *     2.  Add all machine-specific cpp symbols (either defined by you or by
  34.  *         the preprocessor or compiler) to the predefs table in 
  35.  *         config/imakemdep.h.
  36.  *
  37.  *     3.  But a new #ifdef block below that defines MacroIncludeFile and
  38.  *         MacroFile for your new platform and then #undefs the machine-
  39.  *         specific preprocessor symbols (to avoid problems with file names).
  40.  *
  41.  *     4.  Create a .cf file with the name given by MacroFile.
  42.  */
  43.  
  44. #ifdef sprite
  45. #ifdef ds3100
  46. #ifndef ultrix
  47. #define ultrix
  48. #endif
  49. #endif
  50. #endif
  51.  
  52. #ifdef ultrix
  53. #define MacroIncludeFile <ultrix.cf>
  54. #define MacroFile ultrix.cf
  55. #ifdef vax
  56. #undef vax
  57. #define VaxArchitecture
  58. #endif
  59. #ifdef mips
  60. #undef mips
  61. #define MipsArchitecture
  62. #endif
  63. #undef ultrix
  64. #define UltrixArchitecture
  65. #endif
  66.  
  67. #if defined(vax) && !defined(UltrixArchitecture)
  68. #define MacroIncludeFile <bsd.cf>
  69. #define MacroFile bsd.cf
  70. #undef vax
  71. #define VaxArchitecture
  72. #endif
  73.  
  74. #ifdef sun
  75. #define MacroIncludeFile <sun.cf>
  76. #define MacroFile sun.cf
  77. #undef sun
  78. #define SunArchitecture
  79. #endif /* sun */
  80.  
  81. #ifdef hpux
  82. #define MacroIncludeFile <hp.cf>
  83. #define MacroFile hp.cf
  84. #undef hpux
  85. #define HPArchitecture
  86. #endif /* hpux */
  87.  
  88. #ifdef att
  89. #define MacroIncludeFile <att.cf>
  90. #define MacroFile att.cf
  91. #undef att
  92. #define ATTArchitecture
  93. #endif /* att */
  94.  
  95. #ifdef apollo
  96. #define MacroIncludeFile <apollo.cf>
  97. #define MacroFile apollo.cf
  98. #undef apollo
  99. #define ApolloArchitecture
  100. #endif /* apollo */
  101.  
  102. #ifdef sony
  103. #define MacroIncludeFile <sony.cf>
  104. #define MacroFile sony.cf
  105. #undef sony
  106. #undef sony_news
  107. #define SonyArchitecture
  108. #ifdef mc68020
  109. #undef mc68020
  110. #undef mc68030
  111. #define Mc68020Architecture
  112. #endif
  113. #ifdef mips
  114. #undef mips
  115. #define MipsArchitecture
  116. #endif
  117. #if !defined(bsd43) || defined(SYSTYPE_SYSV)
  118. #define SonySysvArchitecture
  119. #else
  120. #define SonyBsdArchitecture
  121. #endif
  122. #endif /* sony */
  123.  
  124. #ifdef M4310
  125. #define MacroIncludeFile <pegasus.cf>
  126. #define MacroFile pegasus.cf
  127. #undef M4310
  128. #define PegasusArchitecture
  129. #endif /* M4310 */
  130.  
  131. #ifdef M4330
  132. #define MacroIncludeFile <m4330.cf>
  133. #define MacroFile m4330.cf
  134. #undef  M4330
  135. #define M4330Architecture
  136. #endif /* M4330 */
  137.  
  138. #ifdef macII
  139. /* A/UX cpp has no unique symbol:  build imake with BOOTSTRAPCFLAGS=-DmacII */
  140. #define MacroIncludeFile <macII.cf>
  141. #define MacroFile macII.cf
  142. #undef  macII
  143. #define MacIIArchitecture
  144. #endif /* macII */
  145.  
  146. #ifdef CRAY
  147. #define MacroIncludeFile <cray.cf>
  148. #define MacroFile cray.cf
  149. #undef cray
  150. #define CrayArchitecture
  151. #endif /* CRAY */
  152.  
  153. #ifdef sgi
  154. #define MacroIncludeFile <sgi.cf>
  155. #define MacroFile sgi.cf
  156. #undef sgi
  157. #define SGIArchitecture
  158. #undef mips
  159. #define MipsArchitecture
  160. #endif
  161.  
  162. #ifdef stellar
  163. #define MacroIncludeFile <stellar.cf>
  164. #define MacroFile stellar.cf
  165. #undef stellar
  166. #define StellarArchitecture
  167. #endif
  168.  
  169. #if defined(ibm) || defined(_IBMR2) || defined(ibm032) || defined(aix)
  170. #define MacroIncludeFile <ibm.cf>
  171. #define MacroFile ibm.cf
  172. #ifdef ibm
  173. #undef ibm
  174. #endif
  175. #define IBMArchitecture
  176. #ifdef i386
  177. #undef i386
  178. #define PS2Architecture
  179. #endif
  180. #ifdef ibm032
  181. #undef ibm032
  182. #define RtArchitecture
  183. #endif
  184. #ifdef aix
  185. #undef aix
  186. #define AIXArchitecture
  187. #endif
  188. #ifdef _IBMR2
  189. #undef _IBMR2
  190. #define RsArchitecture
  191. #endif
  192. #endif /* ibm */
  193.  
  194. #ifdef luna
  195. #undef luna
  196. #define MacroIncludeFile <luna.cf>
  197. #define MacroFile luna.cf
  198. #ifdef mc68000
  199. #undef mc68000
  200. #define Mc68000Architecture
  201. #else
  202. #undef mc88000
  203. #define Mc88000Architecture
  204. #endif
  205. #endif
  206.  
  207. #ifdef Mips
  208. #  define MacroIncludeFile "Mips.cf"
  209. #  define MacroFile Mips.cf
  210. #  undef Mips
  211. #  if defined(SYSTYPE_BSD43) || defined(BSD) || defined(BSD43)
  212. #    define MipsBsdArchitecture
  213. #  else /* BSD */
  214. #    define MipsSysvArchitecture
  215. #  endif /* BSD */
  216. #endif /* Mips */
  217.  
  218. #ifdef MOTOROLA
  219. # define MacroIncludeFile <moto.cf>
  220. # define MacroFile moto.cf
  221. # undef MOTOROLA    
  222. # ifdef SYSV
  223. #  define MotoR3Architecture
  224. # endif
  225. # ifdef SVR4
  226. #  define MotoR4Architecture
  227. # endif
  228. #endif /* MOTOROLA */
  229.  
  230. #ifdef SYSV386
  231. # define MacroIncludeFile <x386.cf>
  232. # define MacroFile x386.cf
  233. # ifdef SVR4
  234. #  define i386SVR4Architecture
  235. # else
  236. #  define i386SVR3Architecture
  237. # endif
  238. #endif /* SYSV386 */
  239.  
  240. #ifdef DGUX
  241. #define MacroIncludeFile <DGUX.cf>
  242. #define MacroFile DGUX.cf
  243. #undef DGUX
  244. #define DguxArchitecture
  245. #endif
  246.  
  247. #ifdef __convex__
  248. # define MacroIncludeFile <convex.cf>
  249. # define MacroFile convex.cf
  250. # ifdef convex
  251. #  undef convex
  252. # endif
  253. # define ConvexArchitecture
  254. #endif
  255.  
  256. #ifndef MacroIncludeFile
  257. XCOMM WARNING:  Imake.tmpl not configured; guessing at definitions!!!
  258. XCOMM This might mean that BOOTSTRAPCFLAGS was not set when building imake.
  259. #define MacroIncludeFile <generic.cf>
  260. #define MacroFile generic.cf
  261. #endif
  262.  
  263. /*****************************************************************************
  264.  *                                                                           *
  265.  *                       DO NOT MODIFY BELOW THIS LINE                       *
  266.  *                                                                           *
  267.  *****************************************************************************/
  268.  
  269.  
  270. XCOMM -------------------------------------------------------------------------
  271. XCOMM site-specific configuration parameters that need to come before
  272. XCOMM the platform-specific parameters - edit site.def to change
  273. #define BeforeVendorCF
  274. #include <site.def>
  275. #undef BeforeVendorCF
  276.  
  277. XCOMM -------------------------------------------------------------------------
  278. XCOMM platform-specific configuration parameters - edit MacroFile to change
  279. #include MacroIncludeFile
  280.  
  281. /* It is a kludge to put these two macros here,
  282.  * but Project.tmpl needs them and it is not clear there is a better place.
  283.  */
  284.  
  285. /*
  286.  * Concat - concatenates two strings.
  287.  */
  288. #ifndef Concat
  289. #if __STDC__ && !defined(UnixCpp)
  290. #define Concat(a,b)a##b
  291. #else
  292. #define Concat(a,b)a/**/b
  293. #endif
  294. #endif
  295.  
  296. /*
  297.  * Concat3 - concatenates three strings.
  298.  */
  299. #ifndef Concat3
  300. #if __STDC__ && !defined(UnixCpp)
  301. #define Concat3(a,b,c)a##b##c
  302. #else
  303. #define Concat3(a,b,c)a/**/b/**/c
  304. #endif
  305. #endif
  306.  
  307. XCOMM -------------------------------------------------------------------------
  308. XCOMM site-specific configuration parameters that go after
  309. XCOMM the platform-specific parameters - edit site.def to change
  310. #define AfterVendorCF
  311. #include <site.def>
  312. #undef AfterVendorCF
  313.  
  314. /*
  315.  * defaults for various generic parameters; set in site.def if needed
  316.  */
  317.  
  318. #ifndef HasSharedLibraries
  319. #define HasSharedLibraries NO
  320. #endif
  321. #ifndef SystemV
  322. #define SystemV            NO    /* SYSV (R3) */
  323. #endif
  324. #ifndef SystemV4
  325. #define SystemV4        NO    /* SVR4 */
  326. #endif
  327. #ifndef OSMajorVersion
  328. #define OSMajorVersion          0
  329. #endif
  330. #ifndef OSMinorVersion
  331. #define OSMinorVersion          0
  332. #endif
  333. #ifndef UnalignedReferencesAllowed
  334. #define UnalignedReferencesAllowed NO    /* if arbitrary deref is okay */
  335. #endif
  336. #ifndef ExecableScripts
  337. #if SystemV
  338. #define ExecableScripts        NO
  339. #else
  340. #define ExecableScripts        YES    /* kernel exec() can handle #! */
  341. #endif
  342. #endif
  343.  
  344. #ifndef BourneShell            /* to force shell in makefile */
  345. #define BourneShell        /bin/sh
  346. #endif
  347. #ifndef ConstructMFLAGS
  348. #if SystemV
  349. #define ConstructMFLAGS        YES    /* build MFLAGS from MAKEFLAGS */
  350. #else
  351. #define ConstructMFLAGS        NO    /* build MFLAGS from MAKEFLAGS */
  352. #endif
  353. #endif
  354.  
  355. #ifndef HasLargeTmp
  356. #define HasLargeTmp        NO    /* be paranoid */
  357. #endif
  358. #ifndef HasSockets
  359. #if SystemV || SystemV4
  360. #define HasSockets        NO    /* do not assume it has them */
  361. #else
  362. #define HasSockets        YES    /* bsd does have them */
  363. #endif
  364. #endif
  365. #ifndef HasVFork
  366. #if SystemV
  367. #define HasVFork        NO    /* not yet... */
  368. #else
  369. #define HasVFork        YES
  370. #endif
  371. #endif
  372. #ifndef HasPutenv
  373. #define HasPutenv        NO    /* assume not */
  374. #endif
  375. #ifndef HasVoidSignalReturn
  376. #define HasVoidSignalReturn    YES    /* assume yes */
  377. #endif
  378. #ifndef HasBsearch
  379. #define HasBsearch        YES    /* assume yes */
  380. #endif
  381. #ifndef HasSaberC
  382. #define HasSaberC        NO    /* for people unclear on the concept */
  383. #endif
  384. #ifndef HasFortran
  385. #define HasFortran        NO
  386. #endif
  387. #ifndef HasNdbm
  388. #define HasNdbm            NO
  389. #endif
  390. #ifndef HasSecureRPC
  391. #define HasSecureRPC        NO    /* if you have Secure RPC */
  392. #endif
  393. #ifndef HasShm
  394. #if SystemV || SystemV4
  395. #define HasShm            YES
  396. #else
  397. #define HasShm            NO
  398. #endif
  399. #endif
  400. #ifndef NeedConstPrototypes
  401. #define NeedConstPrototypes    NO
  402. #endif
  403. #ifndef NeedVarargsPrototypes
  404. #define NeedVarargsPrototypes    NO
  405. #endif
  406. #ifndef NeedNestedPrototypes
  407. #define NeedNestedPrototypes    NO
  408. #endif
  409. #ifndef NeedFunctionPrototypes
  410. #define NeedFunctionPrototypes (NeedVarargsPrototypes || NeedNestedPrototypes)
  411. #endif
  412. #ifndef NeedWidePrototypes
  413. #define NeedWidePrototypes    YES    /* mix and match ANSI-C, non-ANSI */
  414. #endif
  415.  
  416. #ifndef StripInstalledPrograms
  417. #define StripInstalledPrograms NO    /* leave symbol table just in case */
  418. #endif
  419.  
  420. #ifndef UsrLibDir
  421. #ifdef ProjectRoot
  422. #define UsrLibDir Concat(ProjectRoot,/lib)
  423. #ifndef AlternateUsrLibDir
  424. #define AlternateUsrLibDir YES
  425. #endif
  426. #else
  427. #define UsrLibDir /usr/lib
  428. #ifndef AlternateUsrLibDir
  429. #define AlternateUsrLibDir NO
  430. #endif
  431. #endif
  432. #else
  433. #ifndef AlternateUsrLibDir
  434. #define AlternateUsrLibDir YES
  435. #endif
  436. #endif
  437. #ifndef IncRoot
  438. #ifdef ProjectRoot
  439. #define IncRoot Concat(ProjectRoot,/include)
  440. #ifndef AlternateIncRoot
  441. #define AlternateIncRoot YES
  442. #endif
  443. #else
  444. #define IncRoot /usr/include
  445. #ifndef AlternateIncRoot
  446. #define AlternateIncRoot NO
  447. #endif
  448. #endif
  449. #else
  450. #ifndef AlternateIncRoot
  451. #define AlternateIncRoot YES
  452. #endif
  453. #endif
  454. #ifndef UNCOMPRESSPATH
  455. #define UNCOMPRESSPATH /usr/ucb/uncompress
  456. #endif
  457. #ifndef OptimizedCDebugFlags
  458. #define OptimizedCDebugFlags -O
  459. #endif
  460. #ifndef DebuggableCDebugFlags
  461. #ifdef ds3100
  462. #define DebuggableCDebugFlags -g3
  463. #else
  464. #define DebuggableCDebugFlags -g
  465. #endif
  466. #endif
  467. #ifndef NoOpCDebugFlags
  468. #define NoOpCDebugFlags /* as nothing */
  469. #endif
  470. #ifndef DefaultCDebugFlags
  471. /* #define DefaultCDebugFlags OptimizedCDebugFlags DebuggableCDebugFlags */
  472. #define DefaultCDebugFlags OptimizedCDebugFlags
  473. #endif 
  474. #ifndef DefaultCCOptions
  475. #define DefaultCCOptions /* as nothing: this is for floating point, etc. */
  476. #endif
  477. #ifndef InstPgmFlags
  478. #define InstPgmFlags -s
  479. #endif
  480. #ifndef InstBinFlags
  481. #define InstBinFlags -m 0755
  482. #endif
  483. #ifndef InstUidFlags
  484. #define InstUidFlags -m 4755
  485. #endif
  486. #ifndef InstLibFlags
  487. #define InstLibFlags -m 0644
  488. #endif
  489. #ifndef InstIncFlags
  490. #define InstIncFlags -m 0444
  491. #endif
  492. #ifndef InstManFlags
  493. #define InstManFlags -m 0444
  494. #endif
  495. #ifndef InstDatFlags
  496. #define InstDatFlags -m 0444
  497. #endif
  498. #ifndef InstKmemFlags
  499. #define InstKmemFlags InstUidFlags    /* put -g kmem -m 2755 in site.def... */
  500. #endif
  501. #ifndef ArCmd
  502. #if HasLargeTmp | SystemV4
  503. #define ArCmd ar cq    /* do nothing special */
  504. #else
  505. #define ArCmd ar clq    /* use local dir for temp files */
  506. #endif
  507. #endif
  508. #ifndef BootstrapCFlags
  509. #define BootstrapCFlags /**/
  510. #endif
  511. #ifndef HasGcc
  512. #define HasGcc NO
  513. #endif
  514. #ifndef CcCmd
  515. #if HasGcc
  516. #define CcCmd gcc
  517. #else
  518. #define CcCmd cc
  519. #endif
  520. #endif
  521. #if HasFortran
  522. #ifndef FortranCmd
  523. #define FortranCmd f77
  524. #endif
  525. #ifndef FortranFlags
  526. #define FortranFlags /**/
  527. #endif
  528. #ifndef FortranDebugFlags
  529. #define FortranDebugFlags /**/        /* for -O or -g */
  530. #endif
  531. #endif
  532. #ifndef AsCmd
  533. #define AsCmd as
  534. #endif
  535. #ifndef CompressCmd
  536. #define CompressCmd compress
  537. #endif
  538. #ifndef CppCmd
  539. #define CppCmd /lib/cpp
  540. #endif
  541. #ifndef PreProcessCmd
  542. #define PreProcessCmd CcCmd -E
  543. #endif
  544. #ifndef InstallCmd
  545. #if SystemV | SystemV4
  546. #ifdef UseInstalled
  547. #define InstallCmd $(BINDIR)/bsdinst        /* hack should be in project */
  548. #else
  549. #define InstallCmd $(SCRIPTSRC)/bsdinst.sh    /* hack should be in project */
  550. #endif
  551. #else
  552. #define InstallCmd update
  553. #endif
  554. #endif
  555. #ifndef LdCmd
  556. #define LdCmd ld
  557. #endif
  558. #ifndef LintCmd
  559. #define LintCmd lint
  560. #endif
  561. #ifndef LintLibFlag
  562. #if SystemV || SystemV4
  563. #define LintLibFlag -o
  564. #else
  565. #define LintLibFlag -C
  566. #endif
  567. #endif
  568. #ifndef LintOpts
  569. #if SystemV || SystemV4
  570. #define LintOpts -ax
  571. #else
  572. #define LintOpts -axz
  573. #endif
  574. #endif
  575. #ifndef CpCmd
  576. #define CpCmd cp
  577. #endif
  578. #ifndef LnCmd
  579. #if SystemV
  580. #define LnCmd ln /* or even cp */
  581. #else
  582. #define LnCmd ln -s
  583. #endif
  584. #endif
  585. #ifndef MakeCmd
  586. #define MakeCmd make
  587. #endif
  588. #ifndef MvCmd
  589. #define MvCmd mv
  590. #endif
  591. #ifndef DoRanlibCmd
  592. #if SystemV || SystemV4
  593. #define DoRanlibCmd 0
  594. #else
  595. #define DoRanlibCmd 1
  596. #endif
  597. #endif
  598. #ifndef RanlibCmd
  599. #define RanlibCmd ranlib
  600. #endif
  601. #ifndef RanlibInstFlags
  602. #define RanlibInstFlags /**/
  603. #endif
  604. #ifndef RmCmd
  605. #define RmCmd rm -f
  606. #endif
  607. #ifndef StandardIncludes
  608. #define StandardIncludes /**/            /* for platform-specifics */
  609. #endif
  610. #ifndef StandardDefines
  611. #if SystemV
  612. #define StandardDefines -DSYSV
  613. #else
  614. #if SystemV4
  615. #define StandardDefines -DSVR4
  616. #else
  617. #define StandardDefines /**/
  618. #endif
  619. #endif
  620. #endif
  621. #ifndef StandardCppDefines
  622. #define StandardCppDefines StandardDefines
  623. #endif
  624. #ifndef Malloc0ReturnsNull
  625. #define Malloc0ReturnsNull NO
  626. #endif
  627. #ifndef NdbmDefines
  628. #if HasNdbm
  629. #define NdbmDefines -DNDBM
  630. #else
  631. #define NdbmDefines /**/
  632. #endif
  633. #endif
  634. #ifndef ExtraLibraries
  635. #if SystemV4
  636. #if HasSockets
  637. #define ExtraLibraries -lsocket -lnsl
  638. #else
  639. #define ExtraLibraries -lnsl
  640. #endif
  641. #else
  642. #define ExtraLibraries /**/
  643. #endif
  644. #endif
  645. #ifndef ExtraLoadFlags
  646. #define ExtraLoadFlags /**/
  647. #endif
  648. #ifndef LdCombineFlags
  649. #if SystemV4
  650. #define LdCombineFlags -r
  651. #else
  652. #define LdCombineFlags -X -r
  653. #endif
  654. #endif
  655. #ifndef TagsCmd
  656. #define TagsCmd ctags
  657. #endif
  658. #ifndef LoaderLibPrefix
  659. #define LoaderLibPrefix /**/            /* cray does -l libX11.a */
  660. #endif
  661. #ifndef DependFlags
  662. #ifdef sprite
  663. #define DependFlags -Dsprite
  664. #else
  665. #define DependFlags /**/
  666. #endif
  667. #endif
  668. #ifndef TroffCmd
  669. #define TroffCmd psroff
  670. #endif
  671. #ifndef MsMacros
  672. #define MsMacros -ms
  673. #endif
  674. #ifndef TblCmd
  675. #define TblCmd tbl
  676. #endif
  677. #ifndef EqnCmd
  678. #define EqnCmd eqn
  679. #endif
  680. #ifndef ExpandManNames
  681. #if SystemV
  682. #define ExpandManNames NO
  683. #else
  684. #define ExpandManNames YES
  685. #endif
  686. #endif
  687. #ifndef TOPDIR
  688. #define TOPDIR .
  689. #endif
  690. #ifndef CURDIR
  691. #define CURDIR .
  692. #endif
  693. #ifndef ExtraFilesToClean
  694. #define ExtraFilesToClean /**/
  695. #endif
  696. #ifndef FilesToClean
  697. #define FilesToClean *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut 
  698. #endif
  699.  
  700.             SHELL = BourneShell
  701.  
  702.               TOP = TOPDIR
  703.       CURRENT_DIR = CURDIR
  704.  
  705.                AR = ArCmd
  706.   BOOTSTRAPCFLAGS = BootstrapCFlags    /* set if cpp does not have uniq sym */
  707.                CC = CcCmd
  708.                AS = AsCmd
  709. #if HasFortran
  710.                FC = FortranCmd
  711.       FDEBUGFLAGS = FortranDebugFlags
  712.           FCFLAGS = FortranFlags $(FDEBUGFLAGS)
  713. #endif
  714.          COMPRESS = CompressCmd
  715.               CPP = CppCmd $(STD_CPP_DEFINES)        /* simple filters */
  716.     PREPROCESSCMD = PreProcessCmd $(STD_CPP_DEFINES)    /* prefered; mdep */
  717.           INSTALL = InstallCmd
  718.                LD = LdCmd
  719.              LINT = LintCmd
  720.       LINTLIBFLAG = LintLibFlag
  721.          LINTOPTS = LintOpts
  722.                LN = LnCmd
  723.              MAKE = MakeCmd
  724.                MV = MvCmd
  725.                CP = CpCmd
  726. #if DoRanlibCmd
  727.            RANLIB = RanlibCmd
  728.   RANLIBINSTFLAGS = RanlibInstFlags
  729. #endif
  730.                RM = RmCmd
  731.             TROFF = TroffCmd
  732.          MSMACROS = MsMacros
  733.               TBL = TblCmd
  734.               EQN = EqnCmd
  735.      STD_INCLUDES = StandardIncludes
  736.   STD_CPP_DEFINES = StandardCppDefines
  737.       STD_DEFINES = StandardDefines
  738.  EXTRA_LOAD_FLAGS = ExtraLoadFlags
  739.   EXTRA_LIBRARIES = ExtraLibraries
  740.              TAGS = TagsCmd
  741. #if ConstructMFLAGS
  742.            MFLAGS = -$(MAKEFLAGS) -l
  743. #endif
  744. #if HasSharedLibraries
  745.     SHAREDCODEDEF = SharedCodeDef
  746.          SHLIBDEF = SharedLibraryDef
  747. #endif
  748. #if !HasVoidSignalReturn
  749.    SIGNAL_DEFINES = -DSIGNALRETURNSINT
  750. #endif
  751. /*
  752.  * The following supports forcing of function prototypes
  753.  */
  754. #if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedConstPrototypes && NeedNestedPrototypes
  755. #define _funcprotodef -DFUNCPROTO=15
  756. #else
  757. #if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedNestedPrototypes
  758. #define _funcprotodef -DFUNCPROTO=11
  759. #else
  760. #if NeedFunctionPrototypes && NeedNestedPrototypes
  761. #define _funcprotodef -DFUNCPROTO=9
  762. #else
  763. #if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedConstPrototypes
  764. #define _funcprotodef -DFUNCPROTO=7
  765. #else
  766. #if NeedFunctionPrototypes && NeedConstPrototypes
  767. #define _funcprotodef -DFUNCPROTO=5
  768. #else
  769. #if NeedFunctionPrototypes && NeedVarargsPrototypes
  770. #define _funcprotodef -DFUNCPROTO=3
  771. #else
  772. #if NeedFunctionPrototypes
  773. #define _funcprotodef -DFUNCPROTO
  774. #else
  775. #define _funcprotodef /**/
  776. #endif
  777. #endif
  778. #endif
  779. #endif
  780. #endif
  781. #endif
  782. #endif
  783. #if NeedWidePrototypes
  784. #define _wideprotodef /**/
  785. #else
  786. #define _wideprotodef -DNARROWPROTO
  787. #endif
  788.     PROTO_DEFINES = _funcprotodef _wideprotodef 
  789. #undef _funcprotodef
  790. #undef _wideprotodef
  791.  
  792. #if StripInstalledPrograms
  793.      INSTPGMFLAGS = InstPgmFlags    /* install flags for stripping */
  794. #else
  795.      INSTPGMFLAGS = 
  796. #endif
  797.      INSTBINFLAGS = InstBinFlags    /* install flags for programs */
  798.      INSTUIDFLAGS = InstUidFlags    /* install flags for setuid programs */
  799.      INSTLIBFLAGS = InstLibFlags    /* install flags for libraries */
  800.      INSTINCFLAGS = InstIncFlags    /* install flags for headers */
  801.      INSTMANFLAGS = InstManFlags    /* install flags for man pages */
  802.      INSTDATFLAGS = InstDatFlags    /* install flags for data files */
  803.     INSTKMEMFLAGS = InstKmemFlags    /* install flags for /dev/kmem progs */
  804.  
  805. #ifdef ProjectRoot
  806.       PROJECTROOT = ProjectRoot
  807. #endif
  808. #ifdef UseInstalled
  809. #if AlternateIncRoot
  810.      TOP_INCLUDES = -I$(INCROOT)    /* def: for alternative /usr/include */
  811. #endif
  812. #else
  813.      TOP_INCLUDES = -I$(TOP)        /* def: for builds within tree */
  814. #endif
  815.       CDEBUGFLAGS = DefaultCDebugFlags
  816.         CCOPTIONS = DefaultCCOptions    /* to distinguish from param flags */
  817. /*
  818.  * STD_INCLUDES contains system-specific includes
  819.  * TOP_INCLUDES specifies how to get to /usr/include or its build substitute
  820.  * EXTRA_INCLUDES contains project-specific includes set in project incfiles
  821.  * INCLUDES contains client-specific includes set in Imakefile
  822.  * LOCAL_LDFLAGS contains client-specific ld flags flags set in Imakefile
  823.  */
  824.       ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES)
  825.        ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(DEFINES)
  826.            CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
  827.         LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES)
  828. #if AlternateUsrLibDir && !defined(UseInstalled)
  829.            LDLIBS = -L$(USRLIBDIR) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
  830. #else
  831.            LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
  832. #endif
  833. #if AlternateUsrLibDir && defined(UseInstalled)
  834.         LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS) -L$(USRLIBDIR)
  835. #else
  836.         LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS)
  837. #endif
  838.    LDCOMBINEFLAGS = LdCombineFlags
  839.       DEPENDFLAGS = DependFlags
  840.  
  841.         MACROFILE = MacroFile
  842.            RM_CMD = $(RM) FilesToClean ExtraFilesToClean
  843.  
  844.     IMAKE_DEFINES = /* leave blank, for command line use only */
  845. #ifdef UseInstalled
  846.          IRULESRC = $(CONFIGDIR)    /* used in rules file */
  847.         IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)
  848. #else
  849.          IRULESRC = $(CONFIGSRC)
  850.         IMAKE_CMD = $(NEWTOP)$(IMAKE) -I$(NEWTOP)$(IRULESRC) $(IMAKE_DEFINES)
  851. #endif
  852.      ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules \
  853.             $(IRULESRC)/Project.tmpl $(IRULESRC)/site.def \
  854.             $(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES)
  855.  
  856. /*
  857.  * get project-specific configuration and rules
  858.  */
  859.  
  860. #include <Project.tmpl>
  861.  
  862. #include <Imake.rules>
  863.  
  864. XCOMM -------------------------------------------------------------------------
  865. XCOMM start of Imakefile
  866. #include INCLUDE_IMAKEFILE
  867.  
  868. XCOMM -------------------------------------------------------------------------
  869. XCOMM common rules for all Makefiles - do not edit
  870. /*
  871.  * These need to be here so that rules in Imakefile occur first;  the blank
  872.  * all is to make sure that an empty Imakefile does not default to make clean.
  873.  */
  874. emptyrule::
  875.  
  876. CleanTarget()
  877.  
  878. #ifndef IHaveSpecialMakefileTarget
  879. MakefileTarget()
  880. #endif
  881.  
  882. TagsTarget()
  883. #ifdef MakefileAdditions
  884. MakefileAdditions()
  885. #endif
  886.  
  887. #if HasSaberC
  888. saber:
  889.     XCOMM load $(ALLDEFINES) $(SRCS)
  890.  
  891. osaber:
  892.     XCOMM load $(ALLDEFINES) $(OBJS)
  893. #endif
  894.  
  895.  
  896. #ifdef IHaveSubdirs
  897. XCOMM -------------------------------------------------------------------------
  898. XCOMM rules for building in SUBDIRS - do not edit
  899.  
  900. InstallSubdirs($(SUBDIRS))
  901. InstallManSubdirs($(SUBDIRS))
  902. CleanSubdirs($(SUBDIRS))
  903. TagSubdirs($(SUBDIRS))
  904. MakefileSubdirs($(SUBDIRS))
  905. IncludesSubdirs($(SUBDIRS))
  906.  
  907. #else
  908. XCOMM -------------------------------------------------------------------------
  909. XCOMM empty rules for directories that do not have SUBDIRS - do not edit
  910.  
  911. install::
  912.     @echo "install in $(CURRENT_DIR) done"
  913.  
  914. install.man::
  915.     @echo "install.man in $(CURRENT_DIR) done"
  916.  
  917. Makefiles::
  918.  
  919. includes::
  920.  
  921. #endif /* if subdirectory rules are needed */
  922.  
  923. XCOMM -------------------------------------------------------------------------
  924. XCOMM dependencies generated by makedepend
  925.